<template>
  <a-modal style="top: 10px;" :bodyStyle="{ padding: '0', 'max-height': '80vh', 'overflow-y': 'auto' }" :title="title"
    :width="1200" :maskClosable="false" :visible="visible" @cancel="visible = false" :button_loading="button_loading">
    <a slot="footer">
      <a-button @click="visible = false">取消</a-button>
    </a>

    <a-spin :indicator="indicator" :spinning="spinning" :tip="tip">
      <div class="spin-content">
        <a-table size="small" bordered :rowKey="record => record.id" :columns="columns" :dataSource="tableDataList">
          <!-- <span slot="action" slot-scope="text, record">
            <template>
              <a size="small" type="link" @click="handleView(record)">详情</a>
            </template>
          </span> -->
        </a-table>
      </div>
    </a-spin>
  </a-modal>
</template>

<script>
import moment from 'moment'
export default {
  name: 'ProblemInfo',
  components: {},
  props: {},
  data() {
    return {
      a: process.env.VUE_APP_API_BASE_URL + '/api/students/ImportExcel',
      indicator: <a-icon type="loading" style="font-size: 24px" spin />,
      visible: false,
      spinning: false,
      title: '巡查问题',
      currentId: 1,
      tip: null,
      button_loading: false,
      columns: [{
        title: '项目名称',
        dataIndex: 'ProjectName',
        key: 'ProjectName',
        align: 'center'
      },

      {
        title: '上报人',
        dataIndex: 'AddUserName',
        key: 'AddUserName',
        align: 'center'
      },

      {
        title: '问题描述',
        dataIndex: 'problemContext',
        key: 'problemContext',
        align: 'center'
      },

      {
        title: '时间',
        dataIndex: 'addTime',
        key: 'addTime',
        align: 'center'
      },
      {
        title: '处置描述',
        dataIndex: 'handlingContext',
        key: 'handlingContext',
        align: 'center'
      },
      {
        title: '处置时间',
        dataIndex: 'handlingTime',
        key: 'handlingTime',
        align: 'center'
      },],
      tableDataList: [

      ]
    }
  },
  watch: {},
  computed: {},
  created() { },
  mounted() { },
  methods: {
    moment,
    view(data) {
      Object.assign(this, {
        spinning: true,
        visible: true,
        CodeDisabled: false,
        currentId: data.id,
        title: '巡查问题'
      })
      this.initData(data)
    },
    initData(data) {
      this.spinning = false
      this.tableDataList = data
    },
  },
}
</script>
<style lang="less" scoped>
.ant-form-item {
  margin-bottom: 0;
}
</style>
